<include file="public@header" />
</head>

<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="{:url('ads/lists')}">Advertisement list</a>
            </li>
            <li>
                <a href="{:url('ads/add')}">Add Advertisement</a>
            </li>
        </ul>
        <form class="well form-inline margin-top-20" method="post" action="{:url('ads/lists')}">
            {:lang('Title')}:
            <input type="text" class="form-control" name="news_title" style="width: 220px;" value="{:input('request.news_title/s','')}"
                placeholder="{:lang('Title')}">
            <input type="submit" class="btn btn-primary" value="{:lang('Search')}" />
            <a class="btn btn-danger" href="{:url('ads/lists')}">{:lang('Clear')}</a>
        </form>
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th width="50">ID</th>
                    <th width="150">{:lang('Title')}</th>
                    <th width="100">{:lang('CREATETIME')}</th>
                    <th width="100">{:lang('STATUS')}</th>
                    <th width="130">{:lang('ACTIONS')}</th>
                </tr>
            </thead>
            <tbody>
                <foreach name="lists" item="vo">
                    <tr>
                        <td>{$vo.news_uuid}</td>
                        <td>{$vo.news_title}</td>
                        <td>{$vo.news_create_time|date='Y-m-d H:i:s',###}</td>
                        <td>
                            <if condition="$vo['news_status'] eq '1'">
                                Open
                            <else/>
                                Close
                            </if>
                        </td>
                        <td>
                            <a href='{:url("ads/edit",array("news_uuid"=>$vo["news_uuid"]))}'>{:lang('Edit')}</a>
                            &nbsp;&nbsp;&nbsp;
                            <if condition="$vo['news_status'] eq '1'">
                                <a href='{:url("ads/del",array("news_uuid"=>$vo["news_uuid"]))}'>{:lang('Delete')}</a>
                            </if>
                        </td>
                    </tr>
                </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>